package cn.tedu.blogger.mapper;

import cn.tedu.blogger.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Insert("insert into user values(null,#{username},#{password},#{nick},#{created})")
    void insert(User user);

    @Select("select nick,password from user where id=#{id}")
    int selectById(Integer id);
}
